package com.eaoa.uc.dictionary.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.eaoa.base.EABaseAction;
import com.eaoa.query.pub.PubDatadictionaryQuery;
import com.eaoa.uc.dictionary.form.DDictionaryForm;

/**
 * DDictionary create and ModifyPre
 * @author zhenglun.zhou
 *
 */
public class DDictionaryModifyPreAction extends EABaseAction{

	protected ActionForward doWork(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){
		DDictionaryForm ddform = (DDictionaryForm) form;
		String ddnostr = request.getParameter("ddno");
		
		if (!isReEntry(request)
				&& StringUtils.isNotBlank(ddnostr)) {
			ddform.setVO(PubDatadictionaryQuery.loadByNo(Long.valueOf(ddnostr)));
		}
		return mapping.findForward("success");
	}

}